package com.foreknow.demo11;

public class Test1 {
    public static void main(String[] args) {
        String s1 = "abc";
        String s2 = "def";
        String s3 = s1+s2;
        System.out.println(s3);

        String s4 = s1.concat("xxx").concat("yyy").concat("zzz");
        System.out.println(s4);

        System.out.println("hamburger".substring(4, 8));
        System.out.println("smiles".substring(1, 5));

        String s5 = "       adsfasd         ";
        System.out.println(s5.trim());

        System.out.println("-------------------------------------------------");
        String s6 = "abc def ghi xxx";
        String[] array = s6.split(" ");
        for(int i = 0;i<array.length;i++){
            System.out.println(array[i]);
        }
    }

}
